The output of a CMOS image sensor used by a digital camera is typically Bayer raw data. Bayer raw data is raw image data, without further processing, captured from a Bayer filter that includes a filter pattern that is typically 50% green, 25% red, and 25% blue. Bayer data is “raw” in that the data is in the format provided by the sensor prior to further processing such as demosaicing. An image sensor typically only senses one color in any given location—as described above, a Bayer filter typically uses a filter pattern that is 50% green sensors, 25% red sensors, and 25% blue sensors. Before an image is displayed, it typically undergoes various processing, such as demosaicing, by which the full color image is reconstructed from the image from the sensor that only captures one color in each location.
The Bayer raw image data may also be in a MIPI format, which is a standardized tight packing of raw sensor data in depths of 6-14 bits with no padding until the end of each row (here, “each row” means each row of image data, where the image data is a two-dimensional array that exists in rows and columns). Data in MIPI format is more compact but lacks the padding that is normally used to for the purpose of data structure alignment. “Data structure alignment” refers to the way in which data is accessed and arranged in memory so that it is possible to determine when particular data structures in memory begin and end. Standard data formats use padding to ensure data structure alignment; because data in MIPI format has no padding until the end of each row, the stride length of MIPI format data must be predetermined (e.g., 128 or 256-bit aligned).